#ifndef Technisches_h_
#define Technisches_h_ Technisches_h_
//------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------
#include <istream>
//------------------------------------------------------------------------
void cleanUpInputStream(std::istream & in);

//------------------------------------------------------------------------
template<typename T>
T readNumber(std::istream & ss, T const& bottom = T(), T const& top = T())
{
	T x;
	ss >> x;

	cleanUpInputStream(ss);

	if ( bottom == top )
	{
		return x;
	}
	else
	{
		if ( x >= bottom && x < top )
		{
			return x;
		}
		else
		{
			return readNumber(ss, bottom, top);
		}
	}
}

#endif // Technisches_h_

